//
//  BaseTableView.m
//  quanminzhekou
//
//  Created by zxl on 15/1/21.
//  Copyright (c) 2015年 zhongqinglongtu. All rights reserved.
//

#import "BaseTableView.h"

@implementation BaseTableView

- (RefreshDropdownView*)refreshView {
    if (nil == _refreshView) {
        _refreshView = [[RefreshDropdownView alloc] initWithFrame:CGRectMake(0, -44, CGRectGetWidth([UIScreen mainScreen].bounds), 44)];
        _refreshView.backgroundColor = [UIColor clearColor];
        [self addSubview:_refreshView];
    }
    
    return _refreshView;
}

- (ReloadMoreDropupView*)reloadMoreView {
    if (nil == _reloadMoreView) {
        _reloadMoreView = [[ReloadMoreDropupView alloc] initWithFrame:CGRectMake(0, self.contentSize.height + (self.bounds.size.height - MIN(self.bounds.size.height, self.contentSize.height)), CGRectGetWidth([UIScreen mainScreen].bounds), 44)];
        _reloadMoreView.backgroundColor = [UIColor clearColor];
        [self addSubview:_reloadMoreView];
    }
    
    return _reloadMoreView;
}

- (void)resetReloadMoreViewFrame {
    _reloadMoreView.frame = CGRectMake(0, self.contentSize.height + (self.bounds.size.height - MIN(self.bounds.size.height, self.contentSize.height)), CGRectGetWidth([UIScreen mainScreen].bounds), 44);
}

@end
